import request from '@/utils/request'

// 查询指定日期的订单总数
export function getOrderCount(date) {
    return request({
        url: '/vehicle/CarCorder/countorder',
        method: 'get',
        params: { date }
    });
}

// 查询指定日期的订单总金额
export function getOrdersunmoney(date) {
    return request({
        url: '/vehicle/CarCorder/summoney',
        method: 'get',
        params: { date }
    });
}

// 查询指定日期的新增用户数目
export function getUserAddCount(date) {
    return request({
        url: '/vehicle/CarCorder/useraddcount',
        method: 'get',
        params: { date }
    })
}

 // 获取指定日期的商户新增数目
 export function getmerchantAddCount(date) {
    return request({
        url: '/vehicle/CarCorder/merchantaddcount',
        method: 'get',
        params: { date }
    })
}

// 获取商户总数
export function getMerchantCount() {
    return request({
        url: '/vehicle/CarCorder/merchantcount',
        method: 'get'
    })
}

// 获取用户总数
export function getUserCount() {
    return request({
        url: '/vehicle/CarCorder/usercount',
        method: 'get'
    })
}

// 获取具体日期的订单类型统计
export function getOrderTypeCount(date) {
    return request({
        url: '/vehicle/CarCorder/typecount',
        method: 'get',
        params: { date }
    })
}

// 获取所有日期的订单类型统计
export function getAllOrderTypeCount() {
    return request({
        url: '/vehicle/CarCorder/alltypecount',
        method: 'get',
    })
}

//获取指定日期的救援任务完成情况
export function getRescueCount(date) {
    return request({
        url: '/vehicle/CarCorder/countsave',
        method: 'get',
        params: { date }
    })
}

//获取全部的救援任务的完成情况
export function getAllRescueCount() {
    return request({
        url: '/vehicle/CarCorder/countallsave',
        method: 'get'
    })
}

//获取指定月份的新增用户数
export function getUserAddCountByMonth(year,month, day) {
    return request({
        url: '/vehicle/CarCorder/tongjitu',
        method: 'get',
        params: { year,month,day }
    })
}
